#!/bin/bash

# 从输入文本中提取以"Depends:"开头的行，并去除开头的"Depends:"部分
dependencies=$(grep "^Depends:" filename.txt | sed 's/Depends://' | tr -d '[:space:]')

# 使用正则表达式提取包名及版本信息
echo "$dependencies" | grep -oP '\S+ \([>=]*\d+(\.\d+)*\)'
